/**
 *  TinyPasswordManager
 *  Copyright (C) 2008 Gross David <gdavid.devel@gmail.com>
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef IDENTIFIER_H
#define IDENTIFIER_H

#include <string>

/*!
 * \class Identifier
 * \brief This class represents an account identifier. 
 *
 * An Identifier object is composed by a login, a password
 * and also a description of the account.
 *
 * \author Gross David <gdavid.devel@gmail.com>
 * \date 06/20/2009
 */

class Identifier {
public:
    //! Create an Identifier object. 
    explicit Identifier();
    
    //! Create an Identifier object. 
    /*!
     *  \param login the login
     *  \param password the password
     *  \param description the description
     */ 
    explicit Identifier(const std::string &login, const std::string &password, const std::string &description);

    //! Get the login
    /*!
     *  \return the login
     */ 
    std::string getLogin() const;

    //! Get the password
    /*!
     *  \return the password
     */ 
    std::string getPassword() const;

    //! Get the description
    /*!
     *  \return the description
     */ 
    std::string getDescription() const;

    //! Set the login
    /*!
     *  \param login the login
     */ 
    void setLogin(const std::string &login);
    
    //! Set the password
    /*!
     *  \param password the password
     */ 
    void setPassword(const std::string &password);
    
    //! Set the description 
    /*!
     *  \param description the description
     */ 
    void setDescription(const std::string &description);

    //! Check Identifiers' equality
    /*!
     *  \return true if the both objects are equals, false otherwise
     */ 
    bool operator==(const Identifier &identifier);
    
    //! Check Identifiers' equality
    /*!
     *  \return false if the both objects are equals, true otherwise
     */ 
    bool operator!=(const Identifier &identifier);

private:
    //! The login
    std::string m_login;

    //! The password
    std::string m_password;

    //! The description
    std::string m_description;
};

#endif
